POV-Ray : Newsgroups : povray.newusers : Looking for info on vaxis_rotate( ) or related functions : Re: Looking for info on vaxis_rotate( ) or related functions Server Time
4 Nov 2024 17:34:23 EST (-0500)
  Re: Looking for info on vaxis_rotate( ) or related functions  
From: Tom Melly
Date: 28 Feb 2003 04:58:32
Message: <3e5f32c8@news.povray.org>
"Will W" <wil### [at] NOSPAMwizzardsnet> wrote in message
news:3e5e7330@news.povray.org...
> I have a situation where I am defining a set of points relative to <0,0,0>
> then rotating them into the final position. In a later step, I need to know
> where one of these points has ended up (so I can use it with the "Connect"
> macro).
>

<snip>

As far as I understand it, I think you need the 'vtransform' function from
'transforms.inc'.

Here is a sample scene that returns the new position to the #debug stream:

#declare S1= sphere{0,0.1 pigment{rgb 1}}
#declare T1= <2,0,0>;
#declare R1= <0,-45,0>;

object{S1 translate T1 rotate R1}

#include "transforms.inc"
#declare NewPos = vtransform(T1, transform{rotate R1});

#debug concat("New Pos: ", vstr(3, NewPos, ",", 0, 5), "\n")


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.